Skip to content

vault: fix the snapshot token, which was built to die monthly - #607

Merged
swares merged 1 commit into
mainfrom
fix/vault-snapshot-token
Sep 23, 2026
Merged

swares merged 1 commit into
mainfrom
fix/vault-snapshot-token

Conversation

@swares

@swares swares commented Sep 23, 2026

Copy link
Copy Markdown
Owner

Fifteen days with no Vault snapshot - last one Sep 8, failing nightly with 403 invalid token. Three stacked defects, all in the six-line one-time recipe at the top of backup-vault.yml.

  1. No -orphan, so the token was a child of token-admin - which docs/OPS.md and 1.11 say is deliberately allowed to lapse. Vault revokes children when the parent expires. token-admin is minted at 720h; one issued around 08-09 expires 09-08, and the last good snapshot is 09-08.

  2. -period=87600h was never honoured. Vault caps period at the effective max_ttl of 768h and warns at creation. A comment promising ten years described a 32-day token.

  3. Nothing renewed it. A periodic token lives one period at a time, so vault token renew -self now runs before every snapshot and fails the unit if it cannot.

The monitoring was not the failure: LabBackupUnitFailed fired nightly and ntfy delivered it, to a phone that had been stolen. One subscriber, so losing the device lost the channel.

Records 2.13's second occurrence - a live token pasted while diagnosing this, because the command I suggested printed it. The fault is in suggesting a command that can print a secret, not in the pasting; the header recipe now uses -field with a redirect.

Also fixes a second marker bug in backlog-audit.py: markers match as substrings, so NOT YET APPLIED contains APPLIED and the tool read 1.14's heading as a completion claim. Strips 'not yet ' before matching; verified against seven headings.

Fifteen days with no Vault snapshot - last one Sep 8, failing nightly with 403 invalid token. Three stacked defects, all in the six-line one-time recipe at the top of backup-vault.yml.

1. No -orphan, so the token was a child of token-admin - which docs/OPS.md and 1.11 say is deliberately allowed to lapse. Vault revokes children when the parent expires. token-admin is minted at 720h; one issued around 08-09 expires 09-08, and the last good snapshot is 09-08.

2. -period=87600h was never honoured. Vault caps period at the effective max_ttl of 768h and warns at creation. A comment promising ten years described a 32-day token.

3. Nothing renewed it. A periodic token lives one period at a time, so vault token renew -self now runs before every snapshot and fails the unit if it cannot.

The monitoring was not the failure: LabBackupUnitFailed fired nightly and ntfy delivered it, to a phone that had been stolen. One subscriber, so losing the device lost the channel.

Records 2.13's second occurrence - a live token pasted while diagnosing this, because the command I suggested printed it. The fault is in suggesting a command that can print a secret, not in the pasting; the header recipe now uses -field with a redirect.

Also fixes a second marker bug in backlog-audit.py: markers match as substrings, so NOT YET APPLIED contains APPLIED and the tool read 1.14's heading as a completion claim. Strips 'not yet <word>' before matching; verified against seven headings.
@swares
swares merged commit 6db94bd into main Sep 23, 2026
4 checks passed
@swares
swares deleted the fix/vault-snapshot-token branch September 23, 2026 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant